package com.lysj.admin.master.bussiness.company.company.service;

import com.lysj.admin.master.bussiness.company.company.domain.Employee;
import com.lysj.admin.master.bussiness.company.company.mapper.EmployeeMapper;
import com.lysj.admin.master.common.spring.mpbase.MyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

/**
 * @author Created by drj on 2019-12-27 16:25
 * @description
 */
@Slf4j
@Service
@Transactional
public class EmployeeService extends MyService<EmployeeMapper, Employee> {


    public Employee findByOpenId(String openId) {
        return this.lambdaQuery()
                .select(Employee::getId, Employee::getIdCardConfirmStatus)
                .eq(Employee::getOpenId, openId)
                .one();
    }
}
